package com.ws.service;

import java.sql.Types;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ws.mapper.TypesDao;
import com.ws.domain.Type;

@Service
public class TypesService {

    @Autowired
    private TypesDao typesDao;

    public void setTypesDao(TypesDao typesDao) {
        this.typesDao = typesDao;
    }

    //查询所有的类目
    public List<Type> typeList() {
        return typesDao.typeList();
    }

    public void typeSave(Type type) {
        typesDao.typeSave(type);
    }
    public Type typeEdit(int id) {
        return typesDao.typeEdit(id);
    }
    public void typeDelete(int id) {
        typesDao.typeDelete(id);
    }
    public void typeUpdate(Type type) {
        typesDao.typeUpdate(type);
    }
    public java.sql.Types get(Integer id) {
        return typesDao.get(id);
    }


    public List<Type> getList() {
        return typesDao.getList();
    }
}
